<!-- 此页面没做loaded处理（图片是否加载成功/失败），因为套层级太多，太复杂，如有需要，需要去cart页面（购物车页面）参考 -->
<template>
	<view class="container">
		<view class="welfare">
			<view class="welfare_eve" v-for="(item, index) in allBox" :key="index">
				<view class="welfare_eve_top">
					<view class="welfare_eve_top_left">
						赠送余额：
						<text>{{item.original_quota}}</text>
					</view>
					<text class="welfare_eve_top_right"> 时间：{{item.createtime}}</text>
				</view>
				<text class="welfare_eve_bot">备注：{{item.remarks}}</text>
			</view><!-- 
			<view class="welfare_eve">
				<view class="welfare_eve_top">
					<view class="welfare_eve_top_left">
						赠送余额：
						<text>66.6</text>
					</view>
					<text class="welfare_eve_top_right"> 时间：2020-11-05 21:34</text>
				</view>
				<text class="welfare_eve_bot">备注：这里是推文1呵呵哒的呵呵呵打的毫无大海大海太</text>
			</view>
			<view class="welfare_eve">
				<view class="welfare_eve_top">
					<view class="welfare_eve_top_left">
						赠送余额：
						<text>66.6</text>
					</view>
					<text class="welfare_eve_top_right"> 时间：2020-11-05 21:34</text>
				</view>
				<text class="welfare_eve_bot">备注：这里是推文1呵呵哒的呵呵呵打的毫无大海大海太</text>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				allBox:{}
			};
		},
		onShow() {
			
		},
		onLoad() {
			this.getAllBox()
		},
		//下拉刷新
		onPullDownRefresh() {
			
		},
		methods: {
			getAllBox() {
				let that = this;
				that.$Request.get(that.$api.company.apiWelfare).then(res => {
					that.allBox = res.data;
					console.log('福利信息',that.allBox)
				}, err => {
					console.log("err: " + JSON.stringify(err));
				});
			},
		}
	}
</script>

<style lang="scss">
	page {
		background: #f5f5f5;
	}
	.welfare{
		background: #fff;
		padding: 2vw;
		.welfare_eve{
			border-bottom: 1rpx solid #eaeef1;
			.welfare_eve_top{
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 2vw 0;
				.welfare_eve_top_left{
					font-size: 32rpx;
					text{
						color: #B72B24;
						margin-left: 2vw;
					}
				}
				.welfare_eve_top_right{
					font-size: 28rpx;
					color: #666;
				}
			}
			.welfare_eve_bot{
				padding: 2vw 0;
				font-size: 32rpx;
			}
		}
	}
</style>
